package com.gxa.insurance.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author lijunlin
 * @date 2022/6/7
 */
@ApiModel(value = "兑换码")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Exchange implements Serializable {
    @ApiModelProperty(name = "id",value = "兑换码编号",dataType = "int",required = false,hidden = true)
    private Integer id;
    @ApiModelProperty(name = "name",value = "兑换码名称 xxx_兑换 与优惠券码对应",dataType = "string",required = true)
    private String  name;
    @ApiModelProperty(name = "begExp",value = "优惠券开始时间(日历)",dataType = "date",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date begExp;
    @ApiModelProperty(name = "endExp",value = "优惠券结束时间(日历)",dataType = "date",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date  endExp;
    @ApiModelProperty(name = "number",value = "优惠券数量(空则不限数量)",dataType = "int",required = true)
    private Integer  number;
    @ApiModelProperty(name = "price",value = "优惠券价格",dataType = "bigdecimal",required = true)
    private BigDecimal price;
    @ApiModelProperty(name = "usedRange",value = "1-全场 2-代理 3-自动 4 代保",dataType = "int",required = true)
    private Integer  usedRange;
    @ApiModelProperty(name = "code",value = "兑换码随机生成",dataType = "string",required = false,hidden = true)
    private String  code;


}
